package com.ctshk.rpc.user.entity.es;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *  门票订单
 * </p>
 *
 * @author 李新科
 * @date 2021/5/27 20:39
 */
@Data
@ApiModel(value="门票订单ES缓存实体")
@Accessors(chain = true)
public class ScenicOrderEs implements Serializable {

    @ApiModelProperty(value = "门票-产品名称")
    @Field(type = FieldType.Text)
    private String productName;

    @ApiModelProperty(value = "门票-门票数")
    private Integer ticketNum;

    @ApiModelProperty(value = "门票-有效期起始")
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "uuuu-MM-dd HH:mm:ss")
    private LocalDateTime vaildDayBegin;

    @ApiModelProperty(value = "门票-有效期截至")
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "uuuu-MM-dd HH:mm:ss")
    private LocalDateTime vaildDayEnd;
}
